﻿@using Kugar.MVC.DaemonUI.Helpers
@using Kugar.MVC.DaemonUI.PageControls.PageCommons
@using WS.FlowAuth.Web.BLL
@inherits Kugar.MVC.DaemonUI.WebDaemonPage


@{
    Layout = "~/Views/Shared/LayoutNoiFrame/Layout_NoFrame.cshtml";

    ViewBag.LogoutUrl = "/Admin/Home/Logout";

    var menus = new[]
    {
        new PageMenu()
        {
            Key = "main",
            LogoUrl = "",
            GotoUrl = "/Admin/AuthLog/List",
            Title = "操作记录"
        },
        new PageMenu()
        {
            Key = "usercode",
            LogoUrl = "",
            GotoUrl = "/Admin/UserCode/List",
            Title = "用户代码管理"
        },
        new PageMenu()
        {
            Key = "userlist",
            LogoUrl = "",
            GotoUrl = "/Admin/User/List",
            Title = "管理员管理",
            Hide = WebBLL.User.CurrentUser?.IsSystem==false
        },
        new PageMenu()
        {
            Key = "changepassword",
            LogoUrl = "",
            GotoUrl = "/Admin/Home/ChangePassword",
            Title = "修改密码"
        }
    };

    ViewBag.Menus = menus;
}


@section header
    {
    @RenderSection("header", false)


    <!-- 如果要用于嵌入到其他网站的iframe,取消以下的注释 -->
    @*<style>
            #mainmenu {
                display: none;
            }

            #page-wrapper {
                margin-left: 0px
            }

            .topnavbar {
                display: none;
            }
        </style>*@
}


@section PageBanner
{
    @RenderSection("PageBanner", false)
}

@section ContentBody
{
    @RenderSection("ContentBody", true)
}

@section ContentFooter
{
    @RenderSection("ContentFooter", false)
}

@section TitleAction
{
    @RenderSection("TitleAction", false)
}

@section Styles
{
    @RenderSection("Styles", false)
}

@section Scripts
{
    <script>
        $(document).ready(function() {
            $(".logout a").attr("href", "/Admin/Home/UserLogout");
        });
        

    </script>

    @RenderSection("Scripts", false)

}